home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / cert / trk3_eg / text_str / text_str.frm (.txt) next >
Encoding:
Visual Basic Form  |  1994-11-27  |  1.5 KB  |  57 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   7365
  8.    Height          =   4425
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4020
  12.    ScaleWidth      =   7365
  13.    Top             =   1140
  14.    Width           =   7485
  15.    Begin CommandButton Command2 
  16.       Caption         =   "Will Work"
  17.       Height          =   495
  18.       Left            =   3840
  19.       TabIndex        =   3
  20.       Top             =   1560
  21.       Width           =   1215
  22.    End
  23.    Begin CommandButton Command1 
  24.       Caption         =   "Fail"
  25.       Height          =   495
  26.       Left            =   3840
  27.       TabIndex        =   2
  28.       Top             =   840
  29.       Width           =   1215
  30.    End
  31.    Begin TextBox Text2 
  32.       Height          =   495
  33.       Left            =   1320
  34.       TabIndex        =   1
  35.       Text            =   "Text2"
  36.       Top             =   1560
  37.       Width           =   1215
  38.    End
  39.    Begin TextBox Text1 
  40.       Height          =   285
  41.       Left            =   1440
  42.       TabIndex        =   0
  43.       Text            =   "Text1"
  44.       Top             =   720
  45.       Width           =   1095
  46.    End
  47. Option Explicit
  48. Sub Command1_Click ()
  49. 'Text2.Text = mytax(text1.Text)
  50. End Sub
  51. Sub Command2_Click ()
  52. Text2.Text = mytax((text1.Text))
  53. End Sub
  54. Function mytax (amt As String) As Single
  55. mytax = Val(amt) * .08
  56. End Function
  57.